interface TodoFilterProps {
    filter: string;
    setFilter: (filter: string) => void;
}

function TodoFilter({filter,setFilter}: TodoFilterProps){
    // ...
    return (
        <>
            <button style={{backgroundColor: filter === 'all' ? 'blue' : 'white'}} onClick={() => setFilter('all')}>All</button>
            <button style={{backgroundColor: filter === 'active' ? 'blue' : 'white'}} onClick={() => setFilter('active')}>Active</button>
            <button style={{backgroundColor: filter === 'completed' ? 'blue' : 'white'}} onClick={() => setFilter('completed')}>Completed</button>
        </>
    )
}

export default TodoFilter